package com.itheima.day03.ZuoYe.ZuoYe5;

public class Test {
    public static void main(String[] args) {
        Computer computer = new Computer();
        computer.startup();
        computer.connect(new Mouse());
        computer.connect(new Keyboard());
        computer.connect(new USB() {
            @Override
            public void connect() {
                System.out.println("我是打印机，我被连接了");
            }

            @Override
            public void disconnect() {
                System.out.println("我被断开了");
            }
        });
        computer.disconnect(new Mouse());
        computer.disconnect(new Keyboard());
        computer.shutdown();
    }
}
